package addon.w3.mdx.com;

import java.io.IOException;
import java.util.Vector;

import addon.w3.mdx.MDXCOM;
import addon.w3.mdx.LEDataInputStream;
import addon.w3.mdx.MDXException;
/**
HELP						// [Helper]
	long	nbytes;
	OBJ[nhlprs]
 * @author madjk
 *
 */
public class MDXHelperCOM extends MDXCOM {
	public final static int HELP = 0;
	public final static int BONE = 256;
	public final static int LITE = 512;
	public final static int EVTS = 1024;
	public final static int ATCH = 2048;
	public final static int CLID = 8192;
	
	int length;
	public Vector objs;
	
	public String getTag() {
		return "HELP";
	}
	
	public void _decode(LEDataInputStream ins) throws IOException, MDXException {
		length = ins.readInt();
		int cntLength = 0;
		objs = new Vector();
		while(cntLength < length) {
			MDXObject obj = new MDXObject();
			obj.decode(ins);
			objs.add(obj);
			cntLength += obj.nbytesi;
		}
	}
	
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("TAG : "+getTag());
		sb.append("\n\tILEN : "+length);
		sb.append("\n\tOBJ[] : "+objs.size());
		return sb.toString();
	}

	@Override
	public boolean isImplicitTag() {
		// TODO Auto-generated method stub
		return true;
	}
}